<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="utf-8">
		<title>webview</title>
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
		<script>
			$(document).ready(function() {
				onLoad()
			});

			function onLoad() {
				let title = GetUrlParam("title")
				let time = GetUrlParam("time")
				let msg = GetUrlParam("msg")
				if (title)
					$(".title").text(title)
				if (time)
					$(".time").text(time)
				if (msg)
					$(".msg").text(msg)
			}

			function onClickFW(json) { //点击事件
				Android.onClickFW(json);
			}
			//获取url参数
			function GetUrlParam(paramName) {
				let url = decodeURI(window.location.href);
				console.log(url)
				var arrObj = url.split("?");
				if (arrObj.length > 1) {
					var arrPara = arrObj[1].split("&");
					var arr;
					for (var i = 0; i < arrPara.length; i++) {
						arr = arrPara[i].split("=");
						if (arr != null && arr[0] == paramName) {
							return arr[1];
						}
					}
					return "";
				} else {
					return "";
				}
			}
		</script>

		<style>
			body,
			html {
				width: 90px;
				height: 90px;
				margin: 0;
				padding: 0;
				overflow: hidden;
			}

			.container {
				display: flex;
				flex-direction: column;
				border-radius: 12px;
				width: 90px;
				height: 90px;
				background: rgba(255, 22, 72, 1);
				border-radius: 12px 12px 12px 12px;
				opacity: 1;
				justify-content: center;
				align-self: center;
			}

			.title {
				text-align: center;
				font-size: 15px;
				font-weight: bold;
				color: rgba(255, 255, 255, 1);
			}

			.time {
				margin-top: 8px;
				text-align: center;
				font-size: 13px;
				color: rgba(255, 255, 255, 1);
			}

			.msg {
				margin-top: 3px;
				text-align: center;
				font-size: 13px;
				color: rgba(255, 255, 255, 1);
			}
		</style>
	</head>

	<body style=" overflow:hidden" scroll="no">
		<div class="container" onclick="onClickFW()">
			<div class="title">
				正在巡逻
			</div>
			<div class="time">
				01:56
			</div>
			<div class="msg">
				102米
			</div>
		</div>
	</body>
</html>